﻿using RFID.BLL;
using RFID.Model;
using System;

namespace RFID.PC.CardCenter
{
    public partial class DestoryCardForm : ChildForm
    {
        public DestoryCardForm(MainForm main, object sender)
              : base(main, sender)
        {
            InitializeComponent();
            Text = Title;
        }

        private void TxtCard_DoubleClick(object sender, EventArgs e)
        {
            GetTagIdByDoubleClick(sender);
        }

        private void BtnOK_Click(object sender, EventArgs e)
        {
            var card = new CardInfo()
            {
                Id = txtCard.Text,
                Pwd = txtPwd.Text
            };

            var result = CardInfoBLL.DestoryCard(card);
            ShowResult(result);
        }
    }
}
